<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>登陆</title>

  </head>

<body>

	<%
    //提示错误信息
    String errMsg=(String)session.getAttribute("err");
    if(errMsg!=null){
     %>
	<div style="color:red;"><%=errMsg %></div>
	<%
    session.removeAttribute("err");}
     %>

	<form action="servlet/LoginServlet" method="post">

		<table border=0>
			<caption>
				<h3>用户登陆</h3>
			</caption>
			<tr>
				<th align="right">用户名:</th>
				<th align="left"><input type="text" name="username">
				</th>
			</tr>

			<tr>
				<th align="right">密码：</th>
				<th align="left"><input type="password" name="password"
					maxlength=6>
				</th>
			</tr>

			<tr>
				<th align="right"><input type="submit" value="登陆">
				</th>
				<th align="left"><input type="reset" value="重置">
				</th>
			</tr>

		</table>

	</form>

</body>
</html>
